/**
 * @author: 小红
 * @date: 2025/3/26
 * @Description: 笔记本
 */

import http from '@/utils/http';
import type { _AxiosRequestConfig } from '@/utils/http/types';
import type { NoteBookDetailEntity, NoteBookEntity } from '@/entity/note/NoteEntity';

/**
 * 笔记本分页
 * @param data
 * @param options
 * @constructor
 */
export const ApiNoteBookPage = (data?: any, options?: _AxiosRequestConfig) => http.get<NoteBookEntity[], true>('/infra/notes/group/page', data, options);

/**
 * 删除笔记本
 * @param id
 * @param options
 * @constructor
 */
export const ApiNoteBookDelete = (id?: string | number, options?: _AxiosRequestConfig) => http.delete(`/infra/notes/group/delete/${id}`, {}, options);

/**
 * 添加笔记本
 * @param data
 * @param options
 * @constructor
 */
export const ApiNoteBookAdd = (data?: any, options?: _AxiosRequestConfig) => http.post(`/infra/notes/group/create`, data, options);

/**
 * 	更新笔记本
 * @param data
 * @param options
 * @constructor
 */
export const ApiNoteBookUpdate = (data?: any, options?: _AxiosRequestConfig) => http.put('/infra/notes/group/update', data, options);

/**
 * 笔记本详情
 * @param id
 * @param options
 * @constructor
 */
export const ApiNoteBookInfo = (id?: string | number, options?: _AxiosRequestConfig) => http.get<NoteBookDetailEntity>(`/infra/notes/group/get/${id}`, {}, options);
